﻿using System;
using System.Windows.Forms;

namespace SkypeBot.Test
{
    using SkypeBot.Core;
    using Core = SkypeBot.Core.Core;

    public partial class RssTestForm : Form
    {
        public RssTestForm()
        {
            InitializeComponent();
        }

        private void ButtonClickHandler(object sender, EventArgs e)
        {
            var obj = Core.Instance.CurrentMessageHandler.Handle(new Message(0, "Yarik", textBox1.Text, DateTime.Now));
            if (obj != null)
            {
                richTextBox1.Text += obj.Message;
            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
            Core.Instance.StartBot();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            Core.Instance.StopBot();
        }

        private void textBox1_TextChanged(object sender, EventArgs e)
        {

        }

        private void radioButton1_CheckedChanged(object sender, EventArgs e)
        {
            Core.Instance.CurrentLaunchMode = Core.LaunchMode.Dev;
        }

        private void radioButton2_CheckedChanged(object sender, EventArgs e)
        {
            Core.Instance.CurrentLaunchMode = Core.LaunchMode.Prod;
        }
    }
}
